package task03;

/**
 * Create by IntelliJ IDEA
 *
 * @author: yuanbinbing
 * @date-Time: 2018/4/8 8:32
 * @description: 顾客类
 */
public class Customer {
   private   String name;
   void  setName(String name1){
     name=name1;
   }
   String getName(){
     return  name;
   }
  void shopping(Market market, Product product){
    Product p= market.sell(product);
    if(p!=null){
      System.out.println(name+"在"+market.getMarketName()+"买到了"+product.getProductName());
    }else{
      System.out.println(name+"白跑了一趟，在"+market.getMarketName()+"没有买到"+product.getProductName());
    }
  }
}
